#ifndef CORRECTION_MODEL_
#define CORRECTION_MODEL_
#include"../model/language_model.h"
#include"../model/translate_model.h"
#include"../distance_calc.h"
class CorrectionModel
{
	private:
		double cost[MAX_QUERYLENGTH];
		string correct(string query);
		pair<string, double> get_prob(vector<string> v, int s, int e);
		map<string, int> lang_model, trans_model, corr2freq, ori2freq;
		map<string, set<string>> ori2corr;
		DistCalc *dist_calc;
		int total_freq;
	public:
		CorrectionModel(DistCalc *dist_calc);
		void build(map<string, int> &lm, map<string, int> &tm);
		void correct_label(map<string, vector<pair<string, int>>> &l2g, map<string, int> &cl);

};
#endif